package cn.sdormitory.smartdor.dao;

import cn.sdormitory.basedata.dto.StudentLeaveDTO;
import cn.sdormitory.basedata.entity.BDevice;
import cn.sdormitory.basedata.vo.StudentLeaveVO;
import cn.sdormitory.smartdor.entity.SdLeave;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @创建人：zhouyang
 * @创建时间：2020/11/27 17:40
 * @version：V1.0
 */
@Mapper
public interface SdLeaveDao extends BaseMapper<SdLeave> {
    SdLeave getLeaveByStuNoAndLeaDate(@Param("studentNo") String studentNo, @Param("startDate") String startDate,@Param("endDate") String endDate);
    List<SdLeave> getLeaveListByTeaId(@Param("classTeacherId")String classTeacherId,@Param("className")String className,@Param("studentNo")String studentNo, @Param("leaveType")String leaveType,@Param("status")String status,@Param("studentName")String studentName,@Param("startDate")String startDate,@Param("endDate")String endDate,@Param("currIndex")int currIndex,@Param("pageSize")int pageSize);
    int getLeaveListByTeaIdCount(@Param("classTeacherId")String classTeacherId,@Param("className")String className,@Param("studentNo")String studentNo, @Param("leaveType")String leaveType,@Param("status")String status,@Param("studentName")String studentName,@Param("startDate")String startDate,@Param("endDate")String endDate,@Param("currIndex")int currIndex,@Param("pageSize")int pageSize);


    int getStudentLeaveCount(@Param("query") StudentLeaveDTO query);
    List<StudentLeaveVO> getStudentLeaveList(@Param("startNum") int startNum,
                                             @Param("pageSize") Integer pageSize,
                                             @Param("query") StudentLeaveDTO query);
}
